package com.dst.smart.handler.disposer;

import android.content.Context;
import com.dst.smart.handler.entity.SemanticResult;
import com.dst.smart.handler.entity.ServiceType;

public class IdiomDisposer extends Disposer {
	public IdiomDisposer(Context context) {
		super(context);
	}

	@Override
	public void disposeResult(SemanticResult result) {
		if (result != null) {
			if (result.getAnswerText().length() > 0) {
				getPlayController().playURLList(result.getUUID(), null);
				//getPlayController().justTTS("", result.getAnswerText());
				getPlayController().playText(result.getUUID(), result.getAnswerText(), true, "", null);
			}
		}
	}

	@Override
	public boolean canHandle(ServiceType type) {
		return (type.equals(ServiceType.IDIOM));
	}

}
